<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>var作用域</title>

    <script>
        var a = 12;
        function myFunction() {
            console.log(a);
            var b = 13;
            if(true){
                var c = 14;
                console.log(b);
            }
            console.log(c);
        }
        myFunction();
    </script>
</head>

</html>